package com.ctp.ui.table;

import com.ctp.thread.factory.ThreadFactory;
import com.ctp.ui.table.util.TableColumnBean;
import com.ctp.ui.table.util.TableRendererLib;

public class AccountTable extends AbstractTableUI {

	private static final long serialVersionUID = 1L;

	public AccountTable() {
		this.setSize(756, 37);
	}

	protected void initTableData() {
		for (String currAcct : ACCOUNT_LIST) {
			String[] acctData = new String[COLUMN_LIST.length];
			acctData[0] = currAcct;

			tableModel.addRow(acctData);
		}

		ThreadFactory.startAccountThread(tableModel);
	}

	protected TableColumnBean[] getTableColumn() {
		return COLUMN_LIST;
	}

	private static final String[] ACCOUNT_LIST = { "354034" };

	private static final TableColumnBean[] COLUMN_LIST = {
			new TableColumnBean("账号", TableRendererLib.STRING_RENDERER),
			new TableColumnBean("总余额", TableRendererLib.DEC_RENDERER),
			new TableColumnBean("可用余额", TableRendererLib.DEC_RENDERER),
			new TableColumnBean("平仓盈亏", TableRendererLib.DEC_RENDERER),
			new TableColumnBean("持仓盈亏", TableRendererLib.DEC_RENDERER),
			new TableColumnBean("手续费", TableRendererLib.DEC_RENDERER) };

}
